package cobersky.skinUI.core
{
	import cobersky.engine.core.BasicFanctory;
	import cobersky.skinUI.core.BluePrint;
	import cobersky.skinUI.core.PageContainer;
	
	public class Page{
		private var _blues:Vector.<BluePrint>;
		private var _page:PageContainer;
		public function Page(page:PageContainer){
			_page=page;
			_blues=new Vector.<BluePrint>;
		}
		public function addBlue(b:BluePrint):void{
			_blues.push(b);
		}
		public function create():void{
			for each(var b:BluePrint in _blues)_page.addChild(BasicFanctory.create(b));
		}
		public function dispose():void{
			var l:int=_blues.length;
			while(l--)_page.removeChildAt(0);
		}
	}
}